<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>

<html>
<head>
<sj:head jqueryui="true" jquerytheme="redmond"></sj:head>
<script type="text/javascript">
	function okButton() {
		alert('OK Button pressed!');
	};

	function cancelButton() {
		alert('Cancel Button pressed!');
		$('#mybuttondialog').dialog('close');
	};

	$.subscribe('tabcomplete', function(event, ui) {
		$('#infopanel').html(
				'<strong>Completed request with Status '
						+ event.originalEvent.status
						+ '.</strong><br/>Status: '
						+ event.originalEvent.request.status);
	});
</script>
</head>
<body>
	<h3>Department Details</h3>
	<s:form action="organisationDetail4Actions" theme="simple">
		<table style="text-align:right;">
			<tr>
				<td><s:submit value="In-Active" align="right"
						action="inactiveAction"></s:submit></td>
				<td><s:submit value="Save" action="saveAction"></s:submit></td>
				<td><s:submit value="Back" action="backAction"></s:submit></td>
			</tr>
		</table>
		<br>
		<fieldset>
			<Legend>Organisation Detail</Legend>

			<sj:tabbedpanel id="remotetabs" spinner="Please wait ..."
				disabledTabs="[2,3,4,5]" onCompleteTopics="tabcomplete"
				onChangeTopics="tabchange">
				<sj:tab id="tab1" target="tone" label="Details" />
				<sj:tab id="tab2" target="ttwo" label="Departments" />

				<div id="tone">
					<fieldset>
						<tr>
							<td><a href="<s:url action="servicesAllSearch"/>">All</a></td>
							<td><a href="<s:url action="services09Search"/>">0-9</a></td>
							<td><a href="<s:url action="servicesAESearch"/>">A B C
									D E</a></td>
							<td><a href="<s:url action="servicesFJSearch"/>">F G H
									I J</a></td>
							<td><a href="<s:url action="servicesKNSearch"/>">K L M
									N</a></td>
							<td><a href="<s:url action="servicesORSearch"/>">O P Q
									R</a></td>
							<td><a href="<s:url action="servicesSVSearch"/>">S T U
									V</a></td>
							<td><a href="<s:url action="servicesWZSearch"/>">W X Y
									Z</a></td>
							<td><s:submit value="Create"></s:submit></td>
							<td><s:checkbox name="includeInactive"> Include In-active </s:checkbox>
							</td>
						</tr>
						<br> <br>
						<center>
							<s:url id="editurl" action="organisationNedit" />
							<s:url id="remoteurl" action="organisationNtable" />
							<sjg:grid id="gridtable" caption="Premise" dataType="json"
								href="%{remoteurl}" pager="true" gridModel="gridModel"
								rowList="10,15,20" rowNum="15" editurl="%{editurl}"
								navigator="true" navigatorAdd="false"
								navigatorEditOptions="{height:280,reloadAfterSubmit:false}"
								navigatorEdit="false" navigatorView="false"
								navigatorSearch="false" navigatorDelete="false"
								navigatorEdit="false" navigatorRefresh="false"
								onSelectRowTopics="rowselect">
								<sjg:gridColumn name="name" index="name" title="Premise Name"
									sortable="true" />
								<sjg:gridColumn name="address" index="address" title="Address"
									sortable="true" />
								<sjg:gridColumn name="primarylocation" index="primarylocation"
									title="Primary Location" sortable="false" />
								<sjg:gridColumn name="phonenumber" index="phonenumber"
									title="Phone Number" sortable="false" />
							</sjg:grid>
						</center>

					</fieldset>
				</div>
				<div id=ttwo></div>
			</sj:tabbedpanel>
		</fieldset>
	</s:form>
</body>
</html>